package sctu.edu.java.year2016.team03.maoyuhao.day20160605.chapter11_2;

/**
 * 创建Number类，通过类中的count方法得到两数的乘积，并调用该方法的主方法中使用try catch语句捕捉异常
 * Created by cc on 2016/6/7.
 */
public class Number {
    double c;
    public void count(double a,double b){
        c=a*b;
        System.out.println(c);
    }

    public static void main(String[] args) {
        Number ex=new Number();
        try{
            ex.count(1.1, 66.6);
        }catch (Exception e){
            System.out.println(e.getMessage());
        }
    }
}


